const p1 = Promise.reject("失败1");
const p2 = new Promise(resolve => setTimeout(() => resolve("成功"), 100));
const p3 = Promise.reject("失败2");
Promise.any([p1, p2, p3]).then(v => console.log(v)); // 输出 "成功"（p2先成功）

Promise.any([p1, p3]).catch(err => {
    console.log(err instanceof AggregateError); // true
    console.log(err.errors); // 输出 ["失败1", "失败2"]
});